Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
@babel/runtime-corejs3
Advanced tools
babel's modular runtime helpers with core-js@3 polyfilling
The @babel/runtime-corejs3 package is a runtime library for Babel that includes polyfills for ECMAScript features using core-js version 3. It is used alongside Babel to enable the use of new JavaScript features in environments that do not natively support them. This package helps to avoid polluting the global scope and reduces the size of the compiled code by deduplicating helper functions.
Polyfilling ECMAScript features
This code imports polyfills for stable ECMAScript features and the regenerator runtime needed to use generators and async functions.
import 'core-js/stable';
import 'regenerator-runtime/runtime';
Usage of built-in methods
This code demonstrates how to use the map method from core-js through the runtime without polluting the global Array prototype.
import { map } from '@babel/runtime-corejs3/core-js-stable/instance/map';
let arr = [1, 2, 3];
let mapped = map.call(arr, x => x * x);
Usage of new syntax features
This code shows how to use the helpers provided by @babel/runtime-corejs3 to work with new syntax features like async functions and generators.
import _asyncToGenerator from '@babel/runtime-corejs3/helpers/asyncToGenerator';
import _regeneratorRuntime from '@babel/runtime-corejs3/regenerator';
const asyncFunc = _asyncToGenerator(function* () {
yield Promise.resolve('Hello World');
});
core-js is a modular standard library for JavaScript, including polyfills for ECMAScript up to 2021. It's similar to @babel/runtime-corejs3 but does not require Babel to work and can be included directly in any JavaScript project.
regenerator-runtime is a standalone runtime for Regenerator-compiled generator and async functions. It is similar to the regenerator part of @babel/runtime-corejs3 but does not include other polyfills or helpers.
Deprecated in favor of separate core-js and regenerator-runtime packages, @babel/polyfill was a package that included Babel's polyfills for ECMAScript features. It was similar to @babel/runtime-corejs3 but was designed to be included globally rather than modularly.
babel's modular runtime helpers with core-js@3 polyfilling
See our website @babel/runtime-corejs3 for more information.
Using npm:
npm install --save @babel/runtime-corejs3
or using yarn:
yarn add @babel/runtime-corejs3
v7.26.0 (2024-10-25)
babel-core
, babel-generator
, babel-parser
, babel-plugin-syntax-import-assertions
, babel-plugin-syntax-import-attributes
, babel-preset-env
, babel-standalone
, babel-types
babel-core
babel-compat-data
, babel-plugin-proposal-regexp-modifiers
, babel-plugin-transform-regexp-modifiers
, babel-preset-env
, babel-standalone
babel-parser
startIndex
parser option (@DylanPiercey)babel-generator
, babel-parser
, babel-plugin-syntax-flow
babel-helpers
, babel-preset-typescript
, babel-runtime-corejs3
import()
in rewriteImportExtensions
(@liuxingbaoyu)babel-generator
, babel-parser
@babel/generator
(@nicolo-ribaudo)babel-core
babel-plugin-proposal-json-modules
, babel-plugin-transform-json-modules
, babel-standalone
proposal-json-modules
to transform-json-modules
(@nicolo-ribaudo)babel-code-frame
, babel-highlight
@babel/highlight
in @babel/code-frame
(@nicolo-ribaudo)babel-generator
, babel-parser
, babel-types
kind
to TSModuleDeclaration
(@liuxingbaoyu)babel-helper-module-transforms
, babel-plugin-transform-modules-commonjs
FAQs
babel's modular runtime helpers with core-js@3 polyfilling
The npm package @babel/runtime-corejs3 receives a total of 6,391,983 weekly downloads. As such, @babel/runtime-corejs3 popularity was classified as popular.
We found that @babel/runtime-corejs3 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.